import {
	createSSRApp
} from "vue";
import App from "./App.vue";
import "@/assets/style.css";
import TabBar from "./components/tabBar/tabBar.vue";
import Nav from "./components/nav/nav.vue";
import Pop from "./components/pop/pop.vue";
import ImageUpload from "./components/imageUpload/imageUpload.vue";
import uviewPlus from 'uview-plus'
export function createApp() {
	const app = createSSRApp(App);
	app.use(uviewPlus)
	app.component('TabBar', TabBar)
	app.component('Nav', Nav)
	app.component('Pop', Pop)
	app.component('ImageUpload', ImageUpload)
	app.config.globalProperties.$goUrl = (url) => {
		if (url.indexOf("/pages/") != -1 || url.indexOf("/subPackage/") != -1) {
			uni.navigateTo({
				url: url,
			});
		} else if (url == "back") {
			uni.navigateBack();
		}
	};
	return {
		app,
	};
}
